package com.SunSoft.PhoneRemoteControl;

import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

final class au
  implements DialogInterface.OnClickListener
{
  public final void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    paramDialogInterface.dismiss();
    if (paramInt == 0)
    {
      paramDialogInterface = new Intent(at.a(this.a), Show_Control.class);
      paramDialogInterface.putExtra("con_id", String.valueOf(at.a(this.a).T));
      paramDialogInterface.putExtra("do_type", "2");
      at.a(this.a).startActivity(paramDialogInterface);
    }
    if (paramInt == 1)
      at.a(this.a).a(false);
    if (paramInt == 2)
    {
      int i = at.a(this.a).T;
      paramDialogInterface = MainControl.f(at.a(this.a)).rawQuery("select ID,control_type,name_ch,name_en,brand_ch,brand_en,control_model  from control_list where ID = ?", new String[] { String.valueOf(i) });
      if (paramDialogInterface.moveToNext())
      {
        paramDialogInterface = paramDialogInterface.getString(paramDialogInterface.getColumnIndex("name_ch"));
        new AlertDialog.Builder(at.a(this.a)).setTitle(MainControl.g(at.a(this.a))).setMessage("是否确定要删除:" + paramDialogInterface + "?").setNegativeButton(at.a(this.a).getString(2131099654), new av(this)).setPositiveButton(at.a(this.a).getString(2131099653), new aw(this)).show();
      }
    }
    if (paramInt != 3)
      return;
    at.a(this.a).bj = 24;
    at.a(this.a).aZ = true;
    new Thread(MainControl.h(at.a(this.a))).start();
  }
}